package net.ib.mtalk.network.pipeline;

import javax.net.ssl.SSLContext;

public class SslContextFactory {

	private static final SSLContext clientContext;
	
	static {
		SSLContext context = null;
		try {
			context = SSLContext.getInstance("TLS");
			context.init(null, SecureTrustManagerFactory.getTrustManagers(), null);
		} catch (Exception e) {
			throw new Error("Failed to initialize the client-side SSLContext", e);
		}

		clientContext = context;
	}

	public static SSLContext getClientContext() {
		return clientContext;
	}
	
}
